import java.util.ArrayList;


public class VideoSegment {
	public int start;      //Frame index
	public int end;        //Frame index
	public double weight;
	public double audioWeight;
	public double motionWeight;
	
	public ArrayList<Integer> keyFrames;
	
	public VideoSegment(int start, int end){
		this.start = start;
		this.end = end;
		keyFrames = new ArrayList<Integer>();
	}
	
	@Override
	public String toString() {		
		return "Start: " + start + ", End: " + end + ", Weight: " + weight + 
		", KeyFrame Number: " + keyFrames.size() + ", audioWeight: "+ audioWeight 
		+ ", motionWeight: " + motionWeight;
	}

	public int getLength(){
		return end-start+1;
	}
	
	public void setAudioWeight(double weight){
		audioWeight = weight;
	}
	
	public void setMotionWeight(double weight){
		motionWeight = weight;
	}
	
	public void calcTotalWeight(){
		weight = audioWeight * AUDIO_SCALE + motionWeight * MOTION_SCALE;
	}
	
	final static double AUDIO_SCALE = 0.618;
	final static double MOTION_SCALE = 0.382;
}
